package com.central.scheduler.common.process;

import com.central.scheduler.common.entity.TaskNode;
import com.central.scheduler.common.entity.TaskNodeRelation;

import java.util.List;

/**
 * @author Tindy
 * @date 2021/11/5
 * @describe
 */
public class ProcessDag {

    /**
     * DAG edge list
     **/
    private List<TaskNodeRelation> edges;

    /**
     * DAG node list
     */
    private List<TaskNode> nodes;

    /**
     * getter method
     *
     * @return the edges
     * @see ProcessDag#edges
     */
    public List<TaskNodeRelation> getEdges() {
        return edges;
    }

    /**
     * setter method
     *
     * @param edges the edges to set
     * @see ProcessDag#edges
     */
    public void setEdges(List<TaskNodeRelation> edges) {
        this.edges = edges;
    }

    /**
     * getter method
     *
     * @return the nodes
     * @see ProcessDag#nodes
     */
    public List<TaskNode> getNodes() {
        return nodes;
    }

    /**
     * setter method
     *
     * @param nodes the nodes to set
     * @see ProcessDag#nodes
     */
    public void setNodes(List<TaskNode> nodes) {
        this.nodes = nodes;
    }

    @Override
    public String toString() {
        return "ProcessDag{" +
                "edges=" + edges +
                ", nodes=" + nodes +
                '}';
    }
}

